<?php
    include 'database.php';
    
    var_dump($_GET);

    $categoryID = $_GET['categoryID'];
    $question = utf8_decode(mysql_real_escape_string($_GET['question']));
    $answer = utf8_decode(mysql_real_escape_string($_GET['answer']));
    
    $sql="INSERT INTO QuizQuestions (id, categoryID, question, answer) VALUES (null, '".$categoryID."', '".$question."', '".$answer."' )";
    
    if (!mysql_query($sql)) {
        die('Error: ' . mysql_error($dbhandle));
    }
    
    mysql_close($dbhandle);
?>